package org.aristotle.demo.model.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

@Data
@ApiModel("收藏夹")
@TableName("tb_favorite")
public class Favorite {

    @ApiModelProperty("收藏夹id")
    @TableId(value = "id", type = IdType.AUTO)
    @JSONField(name = "id")
    private java.lang.Long id;

    @ApiModelProperty("用户id")
    @TableField(value = "user_id")
    @JSONField(name = "userId")
    private java.lang.Long userId;

    @ApiModelProperty("备注")
    @TableField(value = "info")
    @JSONField(name = "info")
    private String info;

    @ApiModelProperty("图书id")
    @TableField(value = "book_id")
    @JSONField(name = "bookId")
    private java.lang.Long bookId;

    @ApiModelProperty("创建时间")
    @JSONField(name = "createTime",format = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT)
    private java.util.Date createTime;
}
